home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Graphics⁄Sound / Speech MPW / Speech.h < prev   
Encoding:
C/C++ Source or Header  |  1988-09-27  |  1.9 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*
  2.  * {            Speechintf for Macintalk
  3.  * 
  4.  * AUTHOR
  5.  *       Pascal Interfaces for MPW modified by Mike Millen
  6.  *       Copyright 1983, 1984, 1985, 1986 Apple Computer Inc. All Rights Reserved
  7.  * 
  8.  *          MPW C version by J. B. Levin September, 1988
  9.  * BUGS
  10.  * }
  11.  */    
  12.  
  13. #ifndef __SPEECH__
  14. #define __SPEECH__
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #define noExcpsFiles    ""            /* signals Reader to use only basic rules */
  20. #define noReader        "noReader"    /* signals SpeechOn to NOT bring in Reader */
  21. #define fullUnitT        -4000        /* error code for driver unit table full */
  22.  
  23. typedef short            SpeechErr;
  24. typedef char            SpeechRecord[100];    /* Driver parm block, used internally */
  25. typedef SpeechRecord    *SpeechPointer,        /* pointer to driver parm block */
  26.                         **SpeechHandle;        /* handle to driver parm block */
  27.  
  28. typedef enum { Male, Female }                                Sex;
  29. typedef enum { Natural, Robotic, NoChange }                    FOMode;
  30. typedef enum { English, French, Spanish, German, Italian }    Language;
  31.  
  32. typedef struct VoiceRecord {
  33.     Sex            theSex;
  34.     Language    theLanguage;
  35.     short        theRate;
  36.     short        thePitch;
  37.     FOMode        theMode;
  38.     Str255        theName;
  39.     long            refCon;
  40.                     } VoiceRecord, *VoicePtr;
  41.  
  42. pascal SpeechErr SpeechOn (ExcpsFile, theSpeech)
  43.     StringPtr        ExcpsFile;
  44.     SpeechHandle    *theSpeech;
  45.     extern;
  46.     
  47. pascal void SpeechOff (theSpeech)
  48.     SpeechHandle    theSpeech;
  49.     extern;
  50.     
  51. pascal void SpeechRate (theSpeech, theRate)
  52.     SpeechHandle    theSpeech;
  53.     short            theRate;
  54.     extern;
  55.  
  56. pascal void SpeechPitch (theSpeech, thePitch, theMode)
  57.     SpeechHandle    theSpeech;
  58.     short            thePitch;
  59.     FOMode            theMode;
  60.     extern;
  61.     
  62. pascal void SpeechSex (theSpeech, theSex)
  63.     SpeechHandle    theSpeech;
  64.     Sex                theSex;
  65.     extern;
  66.  
  67. pascal SpeechErr Reader (theSpeech, EnglishInput,
  68.                             InputLength, PhoneticOutput)
  69.     SpeechHandle    theSpeech;
  70.     Ptr                EnglishInput;
  71.     long            InputLength;
  72.     Handle            PhoneticOutput;
  73.     extern;
  74.  
  75. pascal SpeechErr MacinTalk (theSpeech, Phonemes)
  76.     SpeechHandle    theSpeech;
  77.     Handle            Phonemes;
  78.     extern;
  79.  
  80. #endif    
  81.